package com.aspose.cells;

import java.util.ArrayList;

class zbwl {
   private static char[] a = new char[]{'+', '-', '*', '/', '<', '>', '=', '^', '&', '(', ')'};
   private static String b = "Invalid formula:";
   private int c = 0;
   private ArrayList d;
   private int e;
   private int f;
   private int g;
   private WorksheetCollection h;
   private byte i;
   private static final com.aspose.cells.b.c.a.za j = new com.aspose.cells.b.c.a.za(new String[]{"INDEX", "IF", "", "\"\"", "#NULL!", "#DIV/0!", "#VALUE!", "#REF!", "#NAME?", "#NUM!", "#N/A", "FALSE", "TRUE", "()", " ", "+", "-", "*", "/", "^", "&", ",", ":", "%", "<", "=", "<=", ">=", ">", "<>", "ABS", "ACOS", "ACOSH", "ADDRESS", "ASC", "ASIN", "ASINH", "AND", "ARCTAN", "ATAN", "ATAN2", "ATANH", "AVEDEV", "AVERAGE", "AVERAGEA", "BETADIST", "BETAINV", "BINOMDIST", "CELL", "CEILING", "CHAR", "CHIDIST", "CHIINV", "CHITEST", "CHOOSE", "CLEAN", "CODE", "COLUMN", "COLUMNS", "COMBIN", "CONCATENATE", "CONFIDENCE", "CORREL", "COS", "COSH", "COUNT", "COUNTA", "COUNTBLANK", "COUNTIF", "COVAR", "CRITBINOM", "DATE", "DATEDIF", "DATESTRING", "DATEVALUE", "DAVERAGE", "DAYS360", "DCOUNT", "DCOUNTA", "DAY", "DB", "DDB", "DGET", "DEGREES", "DEVSQ", "DMAX", "DMIN", "DOLLAR", "DPRODUCT", "DSTDEV", "DSTDEVP", "DSUM", "DVAR", "DVARP", "ERROR.TYPE", "EVEN", "EXACT", "EXP", "EXPONDIST", "FACT", "FDIST", "FINV", "FIND", "FINDB", "FIXED", "FLOOR", "FORECAST", "FREQUENCY", "FTEST", "FV", "GAMMADIST", "GAMMAINV", "GAMMALN", "GEOMEAN", "GETPIVOTDATA", "HARMEAN", "HLOOKUP", "HOUR", "HYPERLINK", "HYPGEOMVERT", "INDIRECT", "INFO", "INT", "INTERCEPT", "IPMT", "IRR", "ISBLANK", "ISERR", "ISLOGICAL", "ISERROR", "ISNA", "ISNONTEXT", "ISNUMBER", "ISPMT", "ISREF", "ISTEXT", "KURT", "LARGE", "LEFT", "LEFTB", "LEN", "LENB", "LINEST", "LN", "LOG", "LOG10", "LOGNORMDIST", "LOGINV", "LOGEST", "NEGBINOMDIST", "LOOKUP", "LOWER", "MATCH", "MAX", "MAXA", "MEDIAN", "MDETERM", "MINVERSE", "MID", "MIDB", "MIN", "MINA", "MINUTE", "MIRR", "MMULT", "MOD", "MODE", "MONTH", "N", "NA", "NORMDIST", "NORMSDIST", "NORMINV", "NORMSINV", "NOT", "NOW", "NUMBERSTRING", "NPER", "NPV", "ODD", "OFFSET", "OR", "PEARSON", "PERCENTILE", "PERCENTRANK", "PERMUT", "PHONETIC", "PI", "PMT", "POISSON", "POWER", "PPMT", "PROB", "PRODUCT", "PROPER", "PV", "QUARTILE", "RADIANS", "RAND", "RANK", "RATE", "REPLACE", "REPLACEB", "REPT", "RIGHT", "RIGHTB", "ROMAN", "ROUND", "ROUNDDOWN", "ROUNDUP", "ROW", "ROWS", "RSQ", "SEARCH", "SEARCHB", "SECOND", "SIGN", "SIN", "SINH", "SKEW", "SLN", "SMALL", "SQRT", "STANDARDIZE", "STDEV", "STDEVA", "STDEVP", "STDEVPA", "STEYX", "SUBSTITUTE", "SUBTOTAL", "SUM", "SUMPRODUCT", "SUMIF", "SUMSQ", "SUMX2MY2", "SUMX2PY2", "SUMXMY2", "SYD", "T", "TAN", "TANH", "TDIST", "TEXT", "TIME", "TIMEVALUE", "TINV", "TODAY", "TRANSPOSE", "TREND", "TRIM", "TRIMMEAN", "TRUNC", "TTEST", "TYPE", "UPPER", "VALUE", "VAR", "VARA", "VARP", "VARPA", "VDB", "VLOOKUP", "WEEKDAY", "WEIBULL", "WIDECHAR", "YEAR", "ZTEST"});

   public int a() {
      return this.e;
   }

   public int b() {
      return this.f;
   }

   void a(int var1, int var2, int var3, int var4) {
      this.g = var1;
      this.e = var2;
      this.f = var3;
      this.i = (byte)var4;
      this.c = 0;
      this.d = new ArrayList();
   }

   boolean c() {
      return (this.i & 255 & 1) != 0;
   }

   boolean d() {
      return (this.i & 255 & 2) != 0;
   }

   boolean e() {
      return (this.i & 255 & 16) != 0;
   }

   void a(boolean var1) {
      if (var1) {
         this.i = (byte)(this.i | 16);
      } else {
         this.i = (byte)(this.i & 239);
      }

   }

   zbwl(WorksheetCollection var1) {
      this.h = var1;
      this.c = 0;
      this.d = new ArrayList();
   }

   boolean f() {
      return (this.i & 255 & 32) != 0;
   }

   void b(boolean var1) {
      if (var1) {
         this.i = (byte)(this.i | 32);
      } else {
         this.i = (byte)(this.i & 223);
      }

   }

   byte[] a(zabd var1, int var2, int var3, boolean var4) {
      int var5 = this.a(var1, var2, var3, false, false);
      if (this.f()) {
         var5 += 4;
      }

      byte[] var6 = new byte[var5 + (var4 ? 2 : 0)];
      int var7 = 0;
      if (var4) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var5), 0, var6, 0, 2);
         var7 = 2;
      }

      if (this.f()) {
         var6[var7++] = 25;
         var6[var7++] = 1;
         var7 += 2;
         this.b(false);
      }

      this.a(var1, var6, var7);
      if (this.c == 0) {
         return var6;
      } else {
         byte[] var8 = new byte[var6.length + this.c];
         System.arraycopy(var6, 0, var8, 0, var6.length);
         int var9 = var6.length;

         for(int var10 = 0; var10 < this.d.size(); ++var10) {
            byte[] var11 = (byte[])((byte[])this.d.get(var10));
            System.arraycopy(var11, 0, var8, var9, var11.length);
            var9 += var11.length;
         }

         this.d = null;
         this.c = 0;
         return var8;
      }
   }

   private int a(zabd var1, int var2, int var3, boolean var4, boolean var5) {
      int var6 = 0;
      int[] var7 = this.a(var1, var2, var3);
      boolean var8 = var1.g();
      if (var2 != 96 && var4) {
         switch(var1.f()[0]) {
         case 65:
         case 66:
         case 67:
         case 68:
         case 69:
         case 70:
         case 71:
         case 72:
         case 73:
         case 90:
         case 91:
         case 92:
         case 93:
            var1.f()[0] = (byte)((var1.f()[0] & 255) + 32);
         case 74:
         case 75:
         case 76:
         case 77:
         case 78:
         case 79:
         case 80:
         case 81:
         case 82:
         case 83:
         case 84:
         case 85:
         case 86:
         case 87:
         case 88:
         case 89:
         }
      }

      int var9;
      if (var1.i() != 0 && var1.d() != null && var1.d().size() > 0) {
         for(var9 = 0; var9 < var1.d().size(); ++var9) {
            zabd var10 = (zabd)var1.d().get(var9);
            int var11;
            if (var7 != null && var7.length != 0) {
               if (var9 >= var7.length) {
                  var11 = var7[var7.length - 1];
               } else {
                  var11 = var7[var9];
               }
            } else {
               var11 = 32;
            }

            boolean var12 = var4;
            if (var4) {
               if (var11 == 64 && var1.i() == 3) {
                  switch(j.a(var1.b())) {
                  case 0:
                     var12 = false;
                  }
               }
            } else {
               switch(var3) {
               case 0:
                  var12 = var11 == 96;
                  break;
               case 1:
                  var12 = var11 == 96 || var11 == 32;
                  break;
               case 2:
                  var12 = var11 == 96 || var11 == 32;
               }
            }

            var6 += this.a(var10, var11, var3, var12, var8);
         }
      }

      var9 = var6 + var1.f().length;
      switch(var1.i()) {
      case 2:
         if (var8 && !var5) {
            var9 += 3;
            int var13 = var1.h();
            if (var13 != 9) {
               var9 += 4;
            }

            if (var4) {
               var1.b = 96 | var13;
            } else {
               switch(var2) {
               case 32:
                  var1.b = 32 | var13;
                  break;
               case 64:
                  var1.b = 64 | var13;
                  break;
               case 96:
                  var1.b = 96 | var13;
               }
            }
         }
         break;
      case 3:
         switch(j.a(var1.b())) {
         case 1:
            var9 += var1.d().size() * 4;
         }
      case 4:
      default:
         break;
      case 5:
         var9 += 4;
      }

      return var9;
   }

   int a(zabd var1, byte[] var2, int var3) {
      int var4 = var3;
      int var5;
      zabd var6;
      int var9;
      switch(var1.i()) {
      case 0:
         System.arraycopy(var1.f(), 0, var2, var3, var1.f().length);
         var4 = var3 + var1.f().length;
         break;
      case 1:
      case 4:
      default:
         if (var1.d() != null && var1.d().size() > 0) {
            for(var5 = 0; var5 < var1.d().size(); ++var5) {
               var6 = (zabd)var1.d().get(var5);
               var4 = this.a(var6, var2, var4);
            }
         }

         System.arraycopy(var1.f(), 0, var2, var4, var1.f().length);
         var4 += var1.f().length;
         break;
      case 2:
         if (var1.g() && var1.b >= 32) {
            var5 = var3 + 1;
            var2[var3] = (byte)var1.b;
            var4 = var3 + 3;
            if ((var1.b & 15) != 9) {
               var4 += 4;
               var5 += 4;
            }

            var9 = var4;
            int var10;
            if (var1.d() != null && var1.d().size() > 0) {
               for(var10 = 0; var10 < var1.d().size(); ++var10) {
                  zabd var8 = (zabd)var1.d().get(var10);
                  var4 = this.a(var8, var2, var4);
               }
            }

            System.arraycopy(var1.f(), 0, var2, var4, var1.f().length);
            var4 += var1.f().length;
            var10 = var4 - var9;
            System.arraycopy(com.aspose.cells.b.a.zc.a(var10), 0, var2, var5, 2);
         } else {
            if (var1.d() != null && var1.d().size() > 0) {
               for(var5 = 0; var5 < var1.d().size(); ++var5) {
                  var6 = (zabd)var1.d().get(var5);
                  var4 = this.a(var6, var2, var4);
               }
            }

            System.arraycopy(var1.f(), 0, var2, var4, var1.f().length);
            var4 += var1.f().length;
         }
         break;
      case 3:
         if (var1.d() != null && var1.d().size() > 0) {
            label122:
            switch(j.a(var1.b())) {
            case 1:
               var5 = 0;
               var9 = 0;

               while(true) {
                  if (var9 >= var1.d().size()) {
                     break label122;
                  }

                  zabd var7 = (zabd)var1.d().get(var9);
                  var4 = this.a(var7, var2, var4);
                  switch(var9) {
                  case 0:
                     var2[var4] = 25;
                     var2[var4 + 1] = 2;
                     var4 += 4;
                     var5 = var4;
                     break;
                  case 1:
                     var2[var4] = 25;
                     var2[var4 + 1] = 8;
                     if (var1.d().size() > 2) {
                        var4 += 4;
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var4 - var5), 0, var2, var5 - 2, 2);
                        var5 = var4;
                     } else {
                        var2[var4 + 2] = 3;
                        var2[var4 + 3] = 0;
                        var4 += 4;
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var4 - var5), 0, var2, var5 - 2, 2);
                     }
                     break;
                  case 2:
                     var2[var4] = 25;
                     var2[var4 + 1] = 8;
                     var2[var4 + 2] = 3;
                     var2[var4 + 3] = 0;
                     var4 += 4;
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var4 - var5 + 3), 0, var2, var5 - 2, 2);
                  }

                  ++var9;
               }
            default:
               for(var5 = 0; var5 < var1.d().size(); ++var5) {
                  var6 = (zabd)var1.d().get(var5);
                  var4 = this.a(var6, var2, var4);
               }
            }
         }

         System.arraycopy(var1.f(), 0, var2, var4, var1.f().length);
         var4 += var1.f().length;
         break;
      case 5:
         System.arraycopy(var1.f(), 0, var2, var3, var1.f().length);
         var4 = var3 + var1.f().length;
         if (var1.d() != null && var1.d().size() > 0) {
            for(var5 = 0; var5 < var1.d().size(); ++var5) {
               var6 = (zabd)var1.d().get(var5);
               var4 = this.a(var6, var2, var4);
            }
         }

         if (var1.f()[0] == 99) {
            var2[var4] = 98;
         } else {
            var2[var4] = 66;
         }

         if (var1.d() == null) {
            var2[var4 + 1] = 1;
         } else {
            var2[var4 + 1] = (byte)(var1.d().size() + 1);
         }

         var2[var4 + 2] = -1;
         var4 += 4;
      }

      return var4;
   }

   private int[] a(zabd var1, int var2, int var3) {
      int[] var4 = zabl.h;
      if (var1.i() == 4) {
         int var14 = var1.d() == null ? 0 : var1.d().size();
         if (var14 > 254) {
            throw new CellsException(5, b);
         } else {
            var1.a(new byte[4]);
            switch(var2) {
            case 32:
               var1.f()[0] = 34;
               break;
            case 64:
               var1.f()[0] = 66;
               break;
            case 96:
               var1.f()[0] = 98;
            }

            var1.f()[1] = (byte)(var14 + 1);
            var1.f()[2] = -1;
            return zabl.h;
         }
      } else if (var1.i() == 0) {
         if (var1.d() != null && var1.d().size() != 0) {
            Object var13 = var1.d().get(0);
            if (var13 == null) {
               var1.a(new byte[8]);
               var1.f()[0] = 96;
               this.c += 3;
               com.aspose.cells.b.a.a.ze.a(this.d, (Object)(new byte[3]));
               return zabl.i;
            } else {
               if (var13 instanceof zabd[][]) {
                  zabd[][] var15 = (zabd[][])((zabd[][])var13);
                  var1.a(new byte[8]);
                  switch(var2) {
                  case 64:
                     var1.f()[0] = 64;
                     break;
                  default:
                     var1.f()[0] = 96;
                  }

                  ArrayList var7 = new ArrayList();
                  int var8 = 3;

                  int var10;
                  for(int var9 = 0; var9 < var15.length; ++var9) {
                     for(var10 = 0; var10 < var15[var9].length; ++var10) {
                        zabd var11 = var15[var9][var10];
                        this.a(var11);
                        com.aspose.cells.b.a.a.ze.a(var7, (Object)var11.f());
                        var8 += var11.f().length;
                     }
                  }

                  byte[] var16 = new byte[var8];
                  com.aspose.cells.b.a.a.ze.a(this.d, (Object)var16);
                  this.c += var8;
                  var16[0] = (byte)(var15[0].length - 1);
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var15.length - 1), 0, var16, 1, 2);
                  var10 = 3;

                  for(int var17 = 0; var17 < var7.size(); ++var17) {
                     byte[] var12 = (byte[])((byte[])var7.get(var17));
                     System.arraycopy(var12, 0, var16, var10, var12.length);
                     var10 += var12.length;
                  }
               }

               return zabl.i;
            }
         } else {
            throw new CellsException(5, b);
         }
      } else {
         String var5 = var1.b();
         if (var5 == null) {
            var1.a(new byte[1]);
            var1.f()[0] = 22;
            return zabl.h;
         } else if (var1.i() == 1) {
            switch(j.a(var5.toUpperCase())) {
            case 2:
            case 3:
               var1.a(new byte[3]);
               var1.f()[0] = 23;
               return zabl.g;
            case 4:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 0;
               return zabl.g;
            case 5:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 7;
               return zabl.g;
            case 6:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 15;
               return zabl.g;
            case 7:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 23;
               return zabl.g;
            case 8:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 29;
               return zabl.g;
            case 9:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 36;
               return zabl.g;
            case 10:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 42;
               return zabl.g;
            case 11:
               var1.a(new byte[2]);
               var1.f()[0] = 29;
               break;
            case 12:
               var1.a(new byte[2]);
               var1.f()[0] = 29;
               var1.f()[1] = 1;
               break;
            case 13:
               var1.a(new byte[1]);
               var1.f()[0] = 21;
               return new int[]{var2};
            default:
               this.a(var1, var2);
            }

            return zabl.h;
         } else {
            zabd var6;
            switch(j.a(var5)) {
            case 0:
               if (var1.d() != null && var1.d().size() >= 2 && var1.d().size() <= 4) {
                  var4 = this.a(var1, 29, var2, var3);
                  var6 = (zabd)var1.d().get(0);
                  if (var6.i() == 2) {
                     switch(j.a(var6.b())) {
                     case 15:
                     case 16:
                     case 17:
                     case 18:
                        var4 = zabl.j;
                     }
                  }
                  break;
               }

               throw new CellsException(5, b);
            case 1:
               if (var1.d() == null || var1.d().size() != 2 && var1.d().size() != 3) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 1, var2, var3);
               break;
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
            default:
               if (var1.i() != 3 && var1.i() != 4) {
                  this.a(var1, var2);
                  var4 = zabl.g;
               } else {
                  var4 = this.b(var1, var2, var3);
               }
               break;
            case 11:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 35, var2, var3);
               break;
            case 12:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 34, var2, var3);
               break;
            case 13:
               var1.a(new byte[1]);
               var1.f()[0] = 21;
               var4 = new int[]{var2};
               break;
            case 14:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var1.a(new byte[1]);
               var1.f()[0] = 15;
               var4 = zabl.h;
               break;
            case 15:
               if (var1.d() == null || var1.d().size() == 0 || var1.d().size() > 2) {
                  throw new CellsException(5, b);
               }

               var1.a(new byte[1]);
               if (var1.d().size() == 1) {
                  var1.f()[0] = 18;
               }

               if (var1.d().size() == 2) {
                  var1.f()[0] = 3;
               }

               var4 = zabl.g;
               break;
            case 16:
               if (var1.d() == null || var1.d().size() == 0 || var1.d().size() > 2) {
                  throw new CellsException(5, b);
               }

               var1.a(new byte[1]);
               if (var1.d().size() == 1) {
                  var1.f()[0] = 19;
               }

               if (var1.d().size() == 2) {
                  var1.f()[0] = 4;
               }

               var4 = zabl.g;
               break;
            case 17:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var1.a(new byte[1]);
               var1.f()[0] = 5;
               var4 = zabl.g;
               break;
            case 18:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var1.a(new byte[1]);
               var1.f()[0] = 6;
               var4 = zabl.g;
               break;
            case 19:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var1.a(new byte[1]);
               var1.f()[0] = 7;
               var4 = zabl.g;
               break;
            case 20:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var1.a(new byte[1]);
               var1.f()[0] = 8;
               var4 = zabl.g;
               break;
            case 21:
               var1.a(new byte[1]);
               var1.f()[0] = 16;
               var4 = zabl.h;
               break;
            case 22:
               if (var1.d() != null && var1.d().size() == 2) {
                  var1.a(new byte[1]);
                  var1.f()[0] = 17;
                  var4 = zabl.h;
                  break;
               }

               throw new CellsException(5, b);
            case 23:
               var1.a(new byte[1]);
               var1.f()[0] = 20;
               var4 = zabl.g;
               break;
            case 24:
               var1.a(new byte[1]);
               var1.f()[0] = 9;
               var4 = zabl.g;
               break;
            case 25:
               var1.a(new byte[1]);
               var1.f()[0] = 11;
               var4 = zabl.g;
               break;
            case 26:
               var1.a(new byte[1]);
               var1.f()[0] = 10;
               var4 = zabl.g;
               break;
            case 27:
               var1.a(new byte[1]);
               var1.f()[0] = 12;
               var4 = zabl.g;
               break;
            case 28:
               var1.a(new byte[1]);
               var1.f()[0] = 13;
               var4 = zabl.g;
               break;
            case 29:
               var1.a(new byte[1]);
               var1.f()[0] = 14;
               var4 = zabl.g;
               break;
            case 30:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 24, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 31:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 99, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 32:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 233, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 33:
               var4 = this.a(var1, 219, var2, var3);
               break;
            case 34:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 214, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 35:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 98, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 36:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 232, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 37:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 36, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 38:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.a(var1, 18, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 39:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 18, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 40:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 97, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 41:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 234, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 42:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 269, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 43:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 5, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 44:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 361, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 45:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var4 = this.a(var1, 270, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 46:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var4 = this.a(var1, 272, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 47:
               if (var1.d() != null && var1.d().size() == 4) {
                  var4 = this.b(var1, 273, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 48:
               if (var1.d() == null || var1.d().size() != 1 && var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 125, var2, var3);
               break;
            case 49:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 288, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 50:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 111, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 51:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 274, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 52:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 275, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 53:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 306, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 54:
               if (var1.d() != null && var1.d().size() >= 1) {
                  var4 = this.a(var1, 100, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 55:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 162, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 56:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 121, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 57:
               if (var1.d() != null && var1.d().size() > 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 9, var2, var3);
               break;
            case 58:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 77, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 59:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 276, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 60:
               if (var1.d() != null && var1.d().size() >= 1) {
                  var4 = this.a(var1, 336, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 61:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 277, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 62:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 307, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 63:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 16, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 64:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 230, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 65:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 0, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 66:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 169, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 67:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 347, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 68:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 346, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 69:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 308, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 70:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 278, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 71:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 65, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 72:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 351, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 73:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 352, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 74:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 140, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 75:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 42, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 76:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var4 = this.a(var1, 220, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 77:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 40, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 78:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 199, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 79:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 67, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 80:
               if (var1.d() != null && (var1.d().size() == 4 || var1.d().size() == 5)) {
                  var4 = this.a(var1, 247, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 81:
               if (var1.d() != null && (var1.d().size() == 4 || var1.d().size() == 5)) {
                  var4 = this.a(var1, 144, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 82:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 235, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 83:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 343, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 84:
               if (var1.d() == null) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 318, var2, var3);
               break;
            case 85:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 44, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 86:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 43, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 87:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var4 = this.a(var1, 204, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 88:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 189, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 89:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 45, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 90:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 195, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 91:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 41, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 92:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 47, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 93:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 196, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 94:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 261, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 95:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 279, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 96:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 117, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 97:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 21, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 98:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 280, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 99:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 184, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 100:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 281, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 101:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 282, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 102:
               if (var1.d() == null || var1.d().size() != 2 && var1.d().size() != 3) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 124, var2, var3);
               break;
            case 103:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var4 = this.a(var1, 205, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 104:
               if (var1.d() != null && var1.d().size() >= 1 && var1.d().size() <= 3) {
                  var4 = this.a(var1, 14, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 105:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 285, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 106:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 309, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 107:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 252, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 108:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 310, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 109:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var4 = this.a(var1, 57, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 110:
               if (var1.d() != null && var1.d().size() == 4) {
                  var4 = this.b(var1, 286, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 111:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 287, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 112:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 271, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 113:
               if (var1.d() == null) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 319, var2, var3);
               break;
            case 114:
               if (var1.d() != null && var1.d().size() >= 2) {
                  var4 = this.a(var1, 358, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 115:
               if (var1.d() == null) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 320, var2, var3);
               break;
            case 116:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 4) {
                  var4 = this.a(var1, 101, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 117:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 71, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 118:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 1)) {
                  var4 = this.a(var1, 359, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 119:
               if (var1.d() != null && var1.d().size() == 4) {
                  var4 = this.b(var1, 289, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 120:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var4 = this.a(var1, 148, var2, var3);
                  this.b(true);
                  break;
               }

               throw new CellsException(5, b);
            case 121:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.a(var1, 244, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 122:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 25, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 123:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 311, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 124:
               if (var1.d() != null && var1.d().size() >= 4 && var1.d().size() <= 6) {
                  var4 = this.a(var1, 167, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 125:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var4 = this.a(var1, 62, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 126:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 129, var2, var3);
               break;
            case 127:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 126, var2, var3);
               break;
            case 128:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 198, var2, var3);
               break;
            case 129:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 3, var2, var3);
               break;
            case 130:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 2, var2, var3);
               break;
            case 131:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 190, var2, var3);
               break;
            case 132:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 128, var2, var3);
               break;
            case 133:
               if (var1.d() == null || var1.d().size() != 4) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 350, var2, var3);
               break;
            case 134:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 105, var2, var3);
               break;
            case 135:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 127, var2, var3);
               break;
            case 136:
               if (var1.d() == null) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 322, var2, var3);
               break;
            case 137:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 325, var2, var3);
               break;
            case 138:
               if (var1.d() == null || var1.d().size() != 1 && var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 115, var2, var3);
               break;
            case 139:
               if (var1.d() == null || var1.d().size() != 1 && var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 208, var2, var3);
               break;
            case 140:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 32, var2, var3);
               break;
            case 141:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 211, var2, var3);
               break;
            case 142:
               if (var1.d() == null || var1.d().size() == 0 || var1.d().size() > 4) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 49, var2, var3);
               break;
            case 143:
               var4 = this.b(var1, 22, var2, var3);
               break;
            case 144:
               if (var1.d() == null || var1.d().size() < 1 || var1.d().size() > 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 109, var2, var3);
               break;
            case 145:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 23, var2, var3);
               break;
            case 146:
               if (var1.d() == null || var1.d().size() != 3) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 290, var2, var3);
               break;
            case 147:
               if (var1.d() == null || var1.d().size() != 3) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 291, var2, var3);
               break;
            case 148:
               if (var1.d() != null && var1.d().size() <= 4 && var1.d().size() >= 1) {
                  var4 = this.a(var1, 51, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 149:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 292, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 150:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var4 = this.a(var1, 28, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 151:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 112, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 152:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var4 = this.a(var1, 64, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 153:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 7, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 154:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 362, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 155:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 227, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 156:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.a(var1, 163, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 157:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.a(var1, 164, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 158:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 31, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 159:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 210, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 160:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 6, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 161:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 363, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 162:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 72, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 163:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 61, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 164:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 165, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 165:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 39, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 166:
               if (var1.d() == null) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 330, var2, var3);
               break;
            case 167:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 68, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 168:
               var4 = this.b(var1, 131, var2, var3);
               break;
            case 169:
               var4 = this.b(var1, 10, var2, var3);
               break;
            case 170:
               if (var1.d() != null && var1.d().size() == 4) {
                  var4 = this.b(var1, 293, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 171:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 294, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 172:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 295, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 173:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 296, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 174:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 38, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 175:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 74, var2, var3);
               break;
            case 176:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 353, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 177:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var4 = this.a(var1, 58, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 178:
               if (var1.d() != null && var1.d().size() >= 2) {
                  var4 = this.a(var1, 11, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 179:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 298, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 180:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var4 = this.a(var1, 78, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 181:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 37, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 182:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 312, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 183:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 328, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 184:
               if (var1.d() != null && var1.d().size() >= 2 && var1.d().size() <= 3) {
                  var4 = this.a(var1, 329, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 185:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 299, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 186:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 360, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 187:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 19, var2, var3);
               break;
            case 188:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var4 = this.a(var1, 59, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 189:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 300, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 190:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 337, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 191:
               if (var1.d() != null && var1.d().size() >= 4 && var1.d().size() <= 6) {
                  var4 = this.a(var1, 168, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 192:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 4) {
                  var4 = this.a(var1, 317, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 193:
               if (var1.d() != null && var1.d().size() >= 1) {
                  var4 = this.a(var1, 183, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 194:
               if (var1.d() != null && var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 114, var2, var3);
               break;
            case 195:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var4 = this.a(var1, 56, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 196:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 327, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 197:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 342, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 198:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 63, var2, var3);
               break;
            case 199:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var4 = this.a(var1, 216, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 200:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 6) {
                  var4 = this.a(var1, 60, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 201:
               if (var1.d() != null && var1.d().size() == 4) {
                  var4 = this.b(var1, 119, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 202:
               if (var1.d() != null && var1.d().size() == 4) {
                  var4 = this.b(var1, 207, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 203:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 30, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 204:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var4 = this.a(var1, 116, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 205:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var4 = this.a(var1, 209, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 206:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var4 = this.a(var1, 354, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 207:
               if (var1.d() == null) {
                  throw new CellsException(5, b);
               }

               if (var1.d().size() == 1) {
                  var6 = new zabd();
                  var6.a("0");
                  var6.a(1);
                  var1.a(var6);
               }

               if (var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 27, var2, var3);
               break;
            case 208:
               if (var1.d() == null) {
                  throw new CellsException(5, b);
               }

               if (var1.d().size() == 1) {
                  var6 = new zabd();
                  var6.a("0");
                  var6.a(1);
                  var1.a(var6);
               }

               if (var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 213, var2, var3);
               break;
            case 209:
               if (var1.d() == null) {
                  throw new CellsException(5, b);
               }

               if (var1.d().size() == 1) {
                  var6 = new zabd();
                  var6.a("0");
                  var6.a(1);
                  var1.a(var6);
               }

               if (var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 212, var2, var3);
               break;
            case 210:
               if (var1.d() != null && var1.d().size() > 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 8, var2, var3);
               break;
            case 211:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 76, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 212:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 313, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 213:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var4 = this.a(var1, 82, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 214:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var4 = this.a(var1, 206, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 215:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 73, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 216:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 26, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 217:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 15, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 218:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 229, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 219:
               if (var1.d() == null) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 323, var2, var3);
               break;
            case 220:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 142, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 221:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 326, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 222:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 20, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 223:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 297, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 224:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 12, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 225:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 366, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 226:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 193, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 227:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 364, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 228:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 314, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 229:
               if (var1.d() != null && (var1.d().size() == 3 || var1.d().size() == 4)) {
                  var4 = this.a(var1, 120, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 230:
               if (var1.d() != null && var1.d().size() >= 2) {
                  var4 = this.a(var1, 344, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 231:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.c(var1, var2);
                  break;
               }

               throw new CellsException(5, b);
            case 232:
               if (var1.d() != null && var1.d().size() != 0) {
                  var4 = this.a(var1, 228, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 233:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var4 = this.a(var1, 345, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 234:
               if (var1.d() != null && var1.d().size() > 30) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 321, var2, var3);
               break;
            case 235:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 304, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 236:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 305, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 237:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 303, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 238:
               if (var1.d() != null && var1.d().size() == 4) {
                  var4 = this.b(var1, 143, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 239:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 130, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 240:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 17, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 241:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 231, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 242:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 301, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 243:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 48, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 244:
               if (var1.d() != null && var1.d().size() == 3) {
                  var4 = this.b(var1, 66, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 245:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 141, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 246:
               if (var1.d() != null && var1.d().size() == 2) {
                  var4 = this.b(var1, 332, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 247:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 221, var2, var3);
               break;
            case 248:
               if (var1.d() != null && var1.d().size() == 1) {
                  var4 = this.b(var1, 83, var2, var3);
                  break;
               }

               throw new CellsException(5, b);
            case 249:
               if (var1.d() == null || var1.d().size() < 1 || var1.d().size() > 4) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 50, var2, var3);
               break;
            case 250:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 118, var2, var3);
               break;
            case 251:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 331, var2, var3);
               break;
            case 252:
               if (var1.d() == null || var1.d().size() != 1 && var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 197, var2, var3);
               break;
            case 253:
               if (var1.d() == null || var1.d().size() != 4) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 316, var2, var3);
               break;
            case 254:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 86, var2, var3);
               break;
            case 255:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 113, var2, var3);
               break;
            case 256:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 33, var2, var3);
               break;
            case 257:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 46, var2, var3);
               break;
            case 258:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 367, var2, var3);
               break;
            case 259:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 194, var2, var3);
               break;
            case 260:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 365, var2, var3);
               break;
            case 261:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 222, var2, var3);
               break;
            case 262:
               if (var1.d() == null || var1.d().size() < 3 || var1.d().size() > 4) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 102, var2, var3);
               break;
            case 263:
               if (var1.d() == null || var1.d().size() != 1 && var1.d().size() != 2) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 70, var2, var3);
               break;
            case 264:
               if (var1.d() == null || var1.d().size() != 4) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 302, var2, var3);
               break;
            case 265:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 215, var2, var3);
               break;
            case 266:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, b);
               }

               var4 = this.b(var1, 69, var2, var3);
               break;
            case 267:
               if (var1.d() == null || var1.d().size() < 2 || var1.d().size() > 3) {
                  throw new CellsException(5, b);
               }

               var4 = this.a(var1, 324, var2, var3);
            }

            return var4;
         }
      }
   }

   private void a(zabd var1) {
      String var2 = var1.b();
      if (var2 != null && var2.length() != 0) {
         if (var2.charAt(0) == '"') {
            var2 = var2.substring(1, 1 + (var2.length() - 2));
            if (var2.length() == 0) {
               var1.a(new byte[4]);
               var1.f()[0] = 2;
               return;
            }
         } else {
            if (zsk.c(var2)) {
               var1.a(new byte[9]);
               var1.f()[0] = 16;
               switch(j.a(var2)) {
               case 4:
                  var1.f()[1] = 0;
                  break;
               case 5:
                  var1.f()[1] = 7;
                  break;
               case 6:
                  var1.f()[1] = 15;
                  break;
               case 7:
                  var1.f()[1] = 23;
                  break;
               case 8:
                  var1.f()[1] = 29;
                  break;
               case 9:
                  var1.f()[1] = 36;
                  break;
               case 10:
                  var1.f()[1] = 42;
               }

               return;
            }

            if (zapb.b(var2)) {
               double var3 = com.aspose.cells.b.a.zn.a(var2, com.aspose.cells.b.a.c.za.b());
               var1.a(new byte[9]);
               var1.f()[0] = 1;
               System.arraycopy(com.aspose.cells.b.a.zc.a(var3), 0, var1.f(), 1, 8);
               return;
            }

            if (var2.toUpperCase().equals("TRUE")) {
               var1.a(new byte[9]);
               var1.f()[0] = 4;
               var1.f()[1] = 1;
               return;
            }

            if (var2.toUpperCase().equals("FALSE")) {
               var1.a(new byte[9]);
               var1.f()[0] = 4;
               return;
            }
         }

         var1.a(new byte[4 + var2.length() * 2]);
         var1.f()[0] = 2;
         System.arraycopy(com.aspose.cells.b.a.zc.a(var2.length()), 0, var1.f(), 1, 2);
         var1.f()[3] = 1;
         System.arraycopy(Encoding.getUnicode().a(var2), 0, var1.f(), 4, var2.length() * 2);
      } else {
         var1.a(new byte[9]);
      }
   }

   private void a(zabd var1, int var2) {
      if (var1.b().charAt(0) == '"' && var1.b().charAt(var1.b().length() - 1) == '"') {
         if (var1.b().length() - 2 > 255) {
            throw new CellsException(5, b);
         } else if ("\"\"".equals(var1.b())) {
            var1.a(new byte[3]);
            var1.f()[0] = 23;
         } else {
            var1.a(var1.b().substring(1, 1 + (var1.b().length() - 2)));
            var1.a(com.aspose.cells.b.a.zv.a(var1.b(), "\"\"", "\""));
            byte[] var10 = zakq.a(var1.b());
            if (var10.length == var1.b().length()) {
               var1.a(new byte[var10.length + 3]);
            } else {
               var10 = Encoding.getUnicode().a(var1.b());
               var1.a(new byte[var10.length + 3]);
               var1.f()[2] = 1;
            }

            var1.f()[1] = (byte)var1.b().length();
            System.arraycopy(var10, 0, var1.f(), 3, var10.length);
            var1.f()[0] = 23;
         }
      } else {
         boolean var3 = zapb.b(var1.b());
         int var6;
         if (var3) {
            double var4 = com.aspose.cells.b.a.zn.a(var1.b(), com.aspose.cells.b.a.c.za.b());
            if (var4 >= 0.0D && var4 <= 65535.0D && var4 - (double)((int)var4 & '\uffff') <= Double.MIN_VALUE) {
               var6 = (int)var4;
               var1.a(new byte[3]);
               var1.f()[0] = 30;
               System.arraycopy(com.aspose.cells.b.a.zc.a(var6), 0, var1.f(), 1, 2);
            } else {
               var1.a(new byte[9]);
               var1.f()[0] = 31;
               System.arraycopy(com.aspose.cells.b.a.zc.a(var4), 0, var1.f(), 1, 8);
            }
         } else {
            String[] var12;
            if (var1.b().indexOf(44) == -1) {
               if (this.c(var1.b())) {
                  int[] var17 = zbqf.a(this.h, var1.b());
                  var1.a(new byte[7]);
                  switch(var2) {
                  case 32:
                     var1.f()[0] = 57;
                     break;
                  case 64:
                     var1.f()[0] = 89;
                     break;
                  case 96:
                     var1.f()[0] = 121;
                  }

                  System.arraycopy(com.aspose.cells.b.a.zc.a(var17[0]), 0, var1.f(), 1, 2);
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var17[1]), 0, var1.f(), 3, 2);
                  return;
               }

               if (this.h.a() != null) {
                  var12 = null;
                  byte[] var15;
                  boolean var18;
                  if (this.h.a() instanceof zauk) {
                     zauk var13 = (zauk)this.h.a();
                     var18 = true;
                     var6 = var13.a(var1.b());
                     if (var6 == -1) {
                        throw new CellsException(12, "References,names,and arrays are not supported in the PivotTable formulas.");
                     }

                     var15 = new byte[]{24, 29, 0, 0, 0, 0};
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var6), 0, var15, 2, 4);
                     var1.a(var15);
                  } else if (this.h.a() instanceof zaus) {
                     zaus var14 = (zaus)this.h.a();
                     var18 = true;
                     var6 = var14.a(var1.b());
                     if (var6 == -1) {
                        throw new CellsException(12, "Pivot table can only refer to items in the same field as calcualted item");
                     }

                     var15 = new byte[]{24, 29, 0, 0, 0, 0};
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var6), 0, var15, 2, 4);
                     var1.a(var15);
                  }

                  return;
               }

               boolean var11;
               if (this.b(var1.b())) {
                  var11 = false;
                  boolean[] var5 = new boolean[]{var11};
                  var1.a(zbsg.a(this.h, this.g, this.e, this.f, var1.b(), var2, var5));
                  var11 = var5[0];
                  if (var11) {
                     this.a(true);
                  }

                  return;
               }

               var11 = this.d(var1.b());
               if (!var11) {
                  var1.a(this.b(var1, var2));
               } else {
                  var1.a(this.a(var1, var1.b(), var2));
               }
            } else {
               var12 = zyn.d(var1.b());
               if (var12 != null && var12.length != 1) {
                  ArrayList var20 = new ArrayList();
                  var6 = 2;

                  int var7;
                  for(var7 = 0; var7 < var12.length; ++var7) {
                     var1.a(var12[var7]);
                     var1.a((byte[])null);
                     boolean var8 = this.d(var1.b());
                     if (!var8) {
                        var1.a(this.b(var1, var2));
                     } else {
                        var1.a(this.a(var1, var1.b(), var2));
                     }

                     if (var1.f() != null) {
                        com.aspose.cells.b.a.a.ze.a(var20, (Object)var1.f());
                        var6 += var1.f().length + 1;
                     }
                  }

                  var1.a(new byte[var6]);
                  var1.f()[0] = 41;
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var6 - 3), 0, var1.f(), 1, 2);
                  var7 = 3;

                  for(int var22 = 0; var22 < var20.size(); ++var22) {
                     byte[] var9 = (byte[])((byte[])var20.get(var22));
                     System.arraycopy(var9, 0, var1.f(), var7, var9.length);
                     var7 += var9.length;
                     if (var22 > 0) {
                        var1.f()[var7] = 16;
                        ++var7;
                     }
                  }
               } else {
                  if (this.c(var1.b())) {
                     int[] var19 = zbqf.a(this.h, var1.b());
                     var1.a(new byte[7]);
                     switch(var2) {
                     case 32:
                        var1.f()[0] = 57;
                        break;
                     case 64:
                        var1.f()[0] = 89;
                        break;
                     case 96:
                        var1.f()[0] = 121;
                     }

                     System.arraycopy(com.aspose.cells.b.a.zc.a(var19[0]), 0, var1.f(), 1, 2);
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var19[1]), 0, var1.f(), 3, 2);
                     return;
                  }

                  boolean var16;
                  if (this.h.a() == null && this.b(var1.b())) {
                     var16 = false;
                     boolean[] var21 = new boolean[]{var16};
                     var1.a(zbsg.a(this.h, this.g, this.e, this.f, var1.b(), var2, var21));
                     var16 = var21[0];
                     if (var16) {
                        this.a(true);
                     }

                     return;
                  }

                  var16 = this.d(var1.b());
                  if (!var16) {
                     var1.a(this.b(var1, var2));
                  } else {
                     var1.a(this.a(var1, var1.b(), var2));
                  }
               }
            }
         }

      }
   }

   byte[] a(zabd var1, String var2, int var3) {
      boolean var4 = false;
      if (this.h != null && this.h.v() != null && this.h.v().getCount() != 0) {
         int var27 = this.h.u();
      }

      byte var5 = 0;
      byte var6 = 0;
      boolean var8 = false;
      boolean var9 = false;

      try {
         int var10 = var2.lastIndexOf(33);
         if (var10 == var2.length() - 1) {
            var10 = var2.indexOf(33);
         }

         byte[] var7;
         boolean var12;
         int var28;
         int var29;
         if (var10 == -1 && !this.d()) {
            boolean var30 = false;
            var12 = false;
            var2 = var2.toUpperCase();
            int[] var32 = new int[]{var5};
            int[] var33 = new int[]{var6};
            boolean[] var34 = new boolean[]{var9};
            boolean[] var36 = new boolean[]{var8};
            boolean[] var38 = new boolean[]{var30};
            boolean[] var39 = new boolean[]{var12};
            boolean var40 = !a(var2, var32, var33, false, var34, var36, var38, var39);
            var28 = var32[0];
            var29 = var33[0];
            var9 = var34[0];
            var8 = var36[0];
            var30 = var38[0];
            var12 = var39[0];
            if (var40) {
               return this.c(var1, var2, var3);
            } else {
               var7 = new byte[5];
               if (this.c() && !var9) {
                  if (var28 >= this.e) {
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var28 - this.e), 0, var7, 1, 2);
                  } else {
                     System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var28 + 1), 0, var7, 1, 2);
                  }
               } else {
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var28), 0, var7, 1, 2);
               }

               if (this.c() && !var8) {
                  if (var29 >= this.f) {
                     var7[3] = (byte)(var29 - this.f);
                  } else {
                     var7[3] = (byte)(255 - this.f + var29 + 1);
                  }
               } else {
                  var7[3] = (byte)var29;
               }

               if (!var8) {
                  var7[4] = (byte)(var7[4] | 64);
               }

               if (!var9) {
                  var7[4] = (byte)(var7[4] | 128);
               }

               if (this.c() && (!var8 || !var9)) {
                  switch(var3) {
                  case 32:
                     var7[0] = 44;
                     break;
                  case 64:
                     var7[0] = 76;
                     break;
                  case 96:
                     var7[0] = 108;
                  }
               } else {
                  switch(var3) {
                  case 32:
                     var7[0] = 36;
                     break;
                  case 64:
                     var7[0] = 68;
                     break;
                  case 96:
                     var7[0] = 100;
                  }
               }

               return var7;
            }
         } else {
            String var11 = null;
            var12 = true;
            String var15 = null;
            boolean var16 = true;
            int var13;
            int var14;
            int var31;
            int var35;
            if (var10 != -1) {
               var11 = var2.substring(0, 0 + var10);
               var11 = this.a(var11);
               var15 = var2.substring(var10 + 1).toUpperCase();
               int[] var17 = zyn.a(this.h, var11);
               var35 = var17[0];
               var31 = var17[1];
               var13 = var17[2];
               var14 = var17[3];
            } else {
               var31 = this.h.u();
               var14 = this.g;
               var13 = this.g;
               var35 = this.h.q().f(var31, var13, var14);
               var15 = var15.toUpperCase();
            }

            if (var35 == -1) {
               return this.c(var1, var2, var3);
            } else {
               boolean var37 = false;
               boolean var18 = false;
               int[] var19 = new int[]{var5};
               int[] var20 = new int[]{var6};
               boolean[] var21 = new boolean[]{var9};
               boolean[] var22 = new boolean[]{var8};
               boolean[] var23 = new boolean[]{var37};
               boolean[] var24 = new boolean[]{var18};
               boolean var25 = !a(var15, var19, var20, false, var21, var22, var23, var24);
               var28 = var19[0];
               var29 = var20[0];
               var9 = var21[0];
               var8 = var22[0];
               var37 = var23[0];
               var18 = var24[0];
               if (var25) {
                  if ("#REF!".equals(var15)) {
                     var7 = new byte[7];
                     switch(var3) {
                     case 32:
                        var7[0] = 60;
                        break;
                     case 64:
                        var7[0] = 92;
                        break;
                     case 96:
                        var7[0] = 124;
                     }

                     System.arraycopy(com.aspose.cells.b.a.zc.a(var35), 0, var7, 1, 2);
                     return var7;
                  } else {
                     return a(this.h, var31, var35, var13, var15, var1.i(), var3);
                  }
               } else {
                  var7 = new byte[7];
                  if (this.d()) {
                     var8 = true;
                     var9 = true;
                  }

                  this.a(var7, 3, var28, var29, var9, var8);
                  switch(var3) {
                  case 32:
                     var7[0] = 58;
                     break;
                  case 64:
                     var7[0] = 90;
                     break;
                  case 96:
                     var7[0] = 122;
                  }

                  System.arraycopy(com.aspose.cells.b.a.zc.a(var35), 0, var7, 1, 2);
                  return var7;
               }
            }
         }
      } catch (Exception var26) {
         return this.c(var1, var2, var3);
      }
   }

   void a(byte[] var1, int var2, int var3, int var4, boolean var5, boolean var6) {
      if (this.c() && !var5) {
         if (var3 >= this.e) {
            System.arraycopy(com.aspose.cells.b.a.zc.a(var3 - this.e), 0, var1, var2, 2);
         } else {
            System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var3 + 1), 0, var1, var2, 2);
         }
      } else {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var3), 0, var1, var2, 2);
      }

      if (this.c() && !var6) {
         if (var4 >= this.f) {
            var1[var2 + 2] = (byte)(var4 - this.f);
         } else {
            var1[var2 + 2] = (byte)(255 - this.f + var4 + 1);
         }
      } else {
         var1[var2 + 2] = (byte)var4;
      }

      if (!var6) {
         var1[var2 + 3] = (byte)(var1[var2 + 3] | 64);
      }

      if (!var5) {
         var1[var2 + 3] = (byte)(var1[var2 + 3] | 128);
      }

   }

   private byte[] b(zabd var1, int var2) {
      int var3 = var1.b().indexOf(58);
      if (var3 == -1) {
         return this.a(var1, var1.b(), var2);
      } else {
         int var4 = var1.b().lastIndexOf(58);
         if (var3 != var1.b().length() - 1 && var1.b().charAt(var3 + 1) == '\\') {
            var3 = var4;
         }

         int var5 = var1.b().lastIndexOf(33);
         String var6;
         String var7;
         if (var3 == var4) {
            var6 = var1.b().substring(0, 0 + var3);
            var7 = com.aspose.cells.b.a.zv.a(var1.b().substring(var3 + 1));
            if (var6 != null && var7 != null) {
               var5 = var6.lastIndexOf(33);
               return var5 == -1 ? this.a(var1, var6, var7, var2) : this.a(var1, var6, var7, var5, var2);
            } else {
               return null;
            }
         } else if (var5 == -1) {
            String[] var15 = com.aspose.cells.b.a.zv.d(var1.b(), ':');
            ArrayList var16 = new ArrayList();
            int var10 = 0;

            for(int var11 = 0; var11 < var15.length; var11 += 2) {
               Object var12 = null;
               byte[] var18;
               if (var11 + 1 >= var15.length) {
                  var18 = this.a(var1, var15[var11], var2);
               } else {
                  var18 = this.a(var1, var15[var11], var15[var11 + 1], var2);
               }

               com.aspose.cells.b.a.a.ze.a(var16, (Object)var18);
               var10 += var18.length;
               if (var11 != 0) {
                  ++var10;
               }
            }

            byte[] var17 = new byte[var10];
            int var19 = 0;

            for(int var13 = 0; var13 < var16.size(); ++var13) {
               byte[] var14 = (byte[])((byte[])var16.get(var13));
               System.arraycopy(var14, 0, var17, var19, var14.length);
               var19 += var14.length;
               if (var13 != 0) {
                  var17[var19++] = 17;
               }
            }

            return var17;
         } else {
            String var8 = var1.b().substring(0, 0 + var3);
            String var9 = var1.b().substring(var3 + 1, var3 + 1 + (var5 - var3 - 1));
            var6 = var1.b().substring(var5 + 1, var5 + 1 + (var4 - var5 - 1));
            var7 = var1.b().substring(var4 + 1);
            return this.a(var1, var8, var9, var6, var7, var2);
         }
      }
   }

   byte[] a(zabd var1, String var2, String var3, int var4) {
      byte[] var5 = new byte[9];
      boolean var6 = false;
      boolean var7 = false;
      boolean var8 = false;
      boolean var9 = false;
      byte var10 = 0;
      byte var11 = 0;
      boolean var12 = false;
      boolean var13 = false;
      boolean var14 = false;
      boolean var15 = false;
      byte var16 = 0;
      byte var17 = 0;

      try {
         int[] var18 = new int[]{var10};
         int[] var19 = new int[]{var11};
         boolean[] var20 = new boolean[]{var6};
         boolean[] var21 = new boolean[]{var7};
         boolean[] var22 = new boolean[]{var8};
         boolean[] var23 = new boolean[]{var9};
         boolean var24 = a(var2, var18, var19, true, var20, var21, var22, var23);
         int var35 = var18[0];
         int var36 = var19[0];
         var6 = var20[0];
         var7 = var21[0];
         var8 = var22[0];
         var9 = var23[0];
         int[] var25 = new int[]{var16};
         int[] var26 = new int[]{var17};
         boolean[] var27 = new boolean[]{var12};
         boolean[] var28 = new boolean[]{var13};
         boolean[] var29 = new boolean[]{var14};
         boolean[] var30 = new boolean[]{var15};
         boolean var31 = a(var3, var25, var26, true, var27, var28, var29, var30);
         int var37 = var25[0];
         int var38 = var26[0];
         var12 = var27[0];
         var13 = var28[0];
         var14 = var29[0];
         var15 = var30[0];
         if (!var24 || !var31 || var8 != var14 || var9 != var15) {
            if (var4 != 96) {
               var4 = 32;
            }

            var1.a(var2);
            var1.a((byte[])null);
            byte[] var32 = this.a(var1, var1.b(), var4);
            var1.a(var3);
            var1.a((byte[])null);
            byte[] var33 = this.a(var1, var1.b(), var4);
            var5 = new byte[var32.length + var33.length + 1];
            System.arraycopy(var32, 0, var5, 0, var32.length);
            System.arraycopy(var33, 0, var5, var32.length, var33.length);
            var5[var5.length - 1] = 17;
            return var5;
         }

         if (this.d()) {
            var13 = true;
            var7 = true;
            var12 = true;
            var6 = true;
         }

         if (var8) {
            if (this.c() && !var6) {
               if (var35 >= this.e) {
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var35 - this.e), 0, var5, 1, 2);
               } else {
                  System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var35 + 1), 0, var5, 1, 2);
               }
            } else {
               System.arraycopy(com.aspose.cells.b.a.zc.a(var35), 0, var5, 1, 2);
            }

            var5[7] = -1;
            if (!var6) {
               var5[6] = (byte)(var5[6] | 128);
            }
         } else if (var9) {
            var5[3] = -1;
            var5[4] = -1;
            if (this.c() && !var7) {
               if (var36 >= this.f) {
                  var5[5] = (byte)(var36 - this.f);
               } else {
                  var5[5] = (byte)(255 - this.f + var36 + 1);
               }
            } else {
               var5[5] = (byte)var36;
            }

            if (!var7) {
               var5[6] = (byte)(var5[6] | 64);
            }
         } else {
            if (this.c() && !var6) {
               if (var35 >= this.e) {
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var35 - this.e), 0, var5, 1, 2);
               } else {
                  System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var35 + 1), 0, var5, 1, 2);
               }
            } else {
               System.arraycopy(com.aspose.cells.b.a.zc.a(var35), 0, var5, 1, 2);
            }

            if (this.c() && !var7) {
               if (var36 >= this.f) {
                  var5[5] = (byte)(var36 - this.f);
               } else {
                  var5[5] = (byte)(255 - this.f + var36 + 1);
               }
            } else {
               var5[5] = (byte)var36;
            }

            if (!var6) {
               var5[6] = (byte)(var5[6] | 128);
            }

            if (!var7) {
               var5[6] = (byte)(var5[6] | 64);
            }
         }

         if (var14) {
            if (this.c() && !var12) {
               if (var37 >= this.e) {
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var37 - this.e), 0, var5, 3, 2);
               } else {
                  System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var37 + 1), 0, var5, 3, 2);
               }
            } else {
               System.arraycopy(com.aspose.cells.b.a.zc.a(var37), 0, var5, 3, 2);
            }

            if (!var12) {
               var5[8] = (byte)(var5[8] | 128);
            }
         } else if (var15) {
            if (this.c() && !var13) {
               if (var38 >= this.f) {
                  var5[7] = (byte)(var38 - this.f);
               } else {
                  var5[7] = (byte)(255 - this.f + var38 + 1);
               }
            } else {
               var5[7] = (byte)var38;
            }

            if (!var13) {
               var5[8] = (byte)(var5[8] | 64);
            }
         } else {
            if (this.c() && !var12) {
               if (var37 >= this.e) {
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var37 - this.e), 0, var5, 3, 2);
               } else {
                  System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var37 + 1), 0, var5, 3, 2);
               }
            } else {
               System.arraycopy(com.aspose.cells.b.a.zc.a(var37), 0, var5, 3, 2);
            }

            if (this.c() && !var13) {
               if (var38 >= this.f) {
                  var5[7] = (byte)(var38 - this.f);
               } else {
                  var5[7] = (byte)(255 - this.f + var38 + 1);
               }
            } else {
               var5[7] = (byte)var38;
            }

            if (!var12) {
               var5[8] = (byte)(var5[8] | 128);
            }

            if (!var13) {
               var5[8] = (byte)(var5[8] | 64);
            }
         }
      } catch (Exception var34) {
         throw new CellsException(5, b);
      }

      if (this.d()) {
         byte[] var39 = new byte[var5.length + 2];
         int var40 = this.h.q().f(this.h.u(), this.g, this.g);
         System.arraycopy(com.aspose.cells.b.a.zc.a(var40), 0, var39, 1, 2);
         System.arraycopy(var5, 1, var39, 3, var5.length - 1);
         switch(var4) {
         case 32:
            var39[0] = 59;
            break;
         case 64:
            var39[0] = 91;
            break;
         case 96:
            var39[0] = 123;
         }

         return var39;
      } else {
         if (this.c()) {
            switch(var4) {
            case 32:
               var5[0] = 45;
               break;
            case 64:
               var5[0] = 77;
               break;
            case 96:
               var5[0] = 109;
            }
         } else {
            switch(var4) {
            case 32:
               var5[0] = 37;
               break;
            case 64:
               var5[0] = 69;
               break;
            case 96:
               var5[0] = 101;
            }
         }

         return var5;
      }
   }

   private String a(String var1) {
      String var2 = var1;
      if (var1.charAt(0) == '\'' && var1.charAt(var1.length() - 1) == '\'') {
         var2 = var1.substring(1, 1 + (var1.length() - 2));
         var2 = com.aspose.cells.b.a.zv.a(var2, "''", "'");
      }

      return var2;
   }

   private byte[] a(zabd var1, String var2, String var3, String var4, String var5, int var6) {
      int var7 = 0;
      if (this.h.v() != null && this.h.v().getCount() != 0) {
         for(int var8 = 0; var8 < this.h.v().getCount(); ++var8) {
            zbqg var9 = this.h.v().a(var8);
            if (var9.e()) {
               var7 = var8;
               break;
            }
         }
      }

      try {
         String var31 = this.a(var2).toUpperCase();
         boolean var32 = false;
         int var11 = 0;
         int var12 = 0;

         int var10;
         for(var10 = 0; var10 < this.h.getCount(); ++var10) {
            if (com.aspose.cells.b.a.zv.b(this.h.get(var10).getName().toUpperCase(), var31)) {
               var32 = true;
               var11 = var10;
               break;
            }
         }

         if (!var32) {
            throw new CellsException(5, "Invalid formula:" + var1.b());
         } else {
            var31 = this.a(var3).toUpperCase();
            var32 = false;

            for(var10 = 0; var10 < this.h.getCount(); ++var10) {
               if (com.aspose.cells.b.a.zv.b(this.h.get(var10).getName().toUpperCase(), var31)) {
                  var12 = var10;
                  var32 = true;
                  break;
               }
            }

            if (var32 && var12 >= var11) {
               int var13 = this.h.q().f(var7, var11, var12);
               if (var13 == -1) {
                  var13 = this.h.q().b(var7, var11, var12);
               }

               byte[] var14 = new byte[11];
               System.arraycopy(com.aspose.cells.b.a.zc.a(var13), 0, var14, 1, 2);
               boolean var15 = false;
               boolean var16 = false;
               boolean var17 = false;
               boolean var18 = false;
               byte var19 = 0;
               byte var20 = 0;

               try {
                  int[] var21 = new int[]{var19};
                  int[] var22 = new int[]{var20};
                  boolean[] var23 = new boolean[]{var15};
                  boolean[] var24 = new boolean[]{var16};
                  boolean[] var25 = new boolean[]{var17};
                  boolean[] var26 = new boolean[]{var18};
                  a(var4, var21, var22, true, var23, var24, var25, var26);
                  int var33 = var21[0];
                  int var34 = var22[0];
                  var15 = var23[0];
                  var16 = var24[0];
                  var17 = var25[0];
                  var18 = var26[0];
                  if (var17) {
                     if (this.c() && !var15) {
                        if (var33 >= this.e) {
                           System.arraycopy(com.aspose.cells.b.a.zc.a(var33 - this.e), 0, var14, 3, 2);
                        } else {
                           System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var33 + 1), 0, var14, 3, 2);
                        }
                     } else {
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var33), 0, var14, 3, 2);
                     }

                     var14[9] = -1;
                     if (!var15) {
                        var14[8] = (byte)(var14[8] | 128);
                     }
                  } else if (var18) {
                     var14[5] = -1;
                     var14[6] = -1;
                     if (this.c() && !var16) {
                        if (var34 >= this.f) {
                           var14[7] = (byte)(var34 - this.f);
                        } else {
                           var14[7] = (byte)(255 - this.f + var34 + 1);
                        }
                     } else {
                        var14[7] = (byte)var34;
                     }

                     if (!var16) {
                        var14[8] = (byte)(var14[8] | 64);
                     }
                  } else {
                     if (this.c() && !var15) {
                        if (var33 >= this.e) {
                           System.arraycopy(com.aspose.cells.b.a.zc.a(var33 - this.e), 0, var14, 3, 2);
                        } else {
                           System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var33 + 1), 0, var14, 3, 2);
                        }
                     } else {
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var33), 0, var14, 3, 2);
                     }

                     if (this.c() && !var16) {
                        if (var34 >= this.f) {
                           var14[7] = (byte)(var34 - this.f);
                        } else {
                           var14[7] = (byte)(255 - this.f + var34 + 1);
                        }
                     } else {
                        var14[7] = (byte)var34;
                     }

                     if (!var15) {
                        var14[8] = (byte)(var14[8] | 128);
                     }

                     if (!var16) {
                        var14[8] = (byte)(var14[8] | 64);
                     }
                  }

                  boolean var27 = var17;
                  boolean var28 = var18;
                  var15 = false;
                  var16 = false;
                  var17 = false;
                  var18 = false;
                  var21[0] = var33;
                  var22[0] = var34;
                  var23[0] = var15;
                  var24[0] = var16;
                  var25[0] = var17;
                  var26[0] = var18;
                  a(var5, var21, var22, true, var23, var24, var25, var26);
                  var33 = var21[0];
                  var34 = var22[0];
                  var15 = var23[0];
                  var16 = var24[0];
                  var17 = var25[0];
                  var18 = var26[0];
                  if (var27 != var17 || var28 != var18) {
                     throw new CellsException(5, "Invalid formula.");
                  }

                  if (var17) {
                     if (this.c() && !var15) {
                        if (var33 >= this.e) {
                           System.arraycopy(com.aspose.cells.b.a.zc.a(var33 - this.e), 0, var14, 5, 2);
                        } else {
                           System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var33 + 1), 0, var14, 5, 2);
                        }
                     } else {
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var33), 0, var14, 5, 2);
                     }

                     if (!var15) {
                        var14[10] = (byte)(var14[10] | 128);
                     }
                  } else if (var18) {
                     if (this.c() && !var16) {
                        if (var34 >= this.f) {
                           var14[9] = (byte)(var34 - this.f);
                        } else {
                           var14[9] = (byte)(255 - this.f + var34 + 1);
                        }
                     } else {
                        var14[9] = (byte)var34;
                     }

                     if (!var16) {
                        var14[10] = (byte)(var14[10] | 64);
                     }
                  } else {
                     if (this.c() && !var15) {
                        if (var33 >= this.e) {
                           System.arraycopy(com.aspose.cells.b.a.zc.a(var33 - this.e), 0, var14, 5, 2);
                        } else {
                           System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var33 + 1), 0, var14, 5, 2);
                        }
                     } else {
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var33), 0, var14, 5, 2);
                     }

                     if (this.c() && !var16) {
                        if (var34 >= this.f) {
                           var14[9] = (byte)(var34 - this.f);
                        } else {
                           var14[9] = (byte)(255 - this.f + var34 + 1);
                        }
                     } else {
                        var14[9] = (byte)var34;
                     }

                     if (!var15) {
                        var14[10] = (byte)(var14[10] | 128);
                     }

                     if (!var16) {
                        var14[10] = (byte)(var14[10] | 64);
                     }
                  }
               } catch (Exception var29) {
                  throw new CellsException(5, b);
               }

               var14[0] = 59;
               return var14;
            } else {
               throw new CellsException(5, "Invalid formula : " + CellsHelper.cellIndexToName(this.a(), this.b()));
            }
         }
      } catch (Exception var30) {
         throw new CellsException(5, b);
      }
   }

   private byte[] a(zabd var1, String var2, String var3, int var4, int var5) {
      if (var3.indexOf("!") != -1) {
         byte[] var30 = this.a(var1, (String)var2, 32);
         byte[] var32 = this.a(var1, (String)var3, 32);
         byte[] var35 = new byte[var30.length + var32.length + 1];
         System.arraycopy(var30, 0, var35, 0, var30.length);
         System.arraycopy(var32, 0, var35, var30.length, var32.length);
         var35[var35.length - 1] = 17;
         return var35;
      } else {
         int var6 = 0;
         if (this.h.v() != null && this.h.v().getCount() != 0) {
            for(int var7 = 0; var7 < this.h.v().getCount(); ++var7) {
               zbqg var8 = this.h.v().a(var7);
               if (var8.e()) {
                  var6 = var7;
                  break;
               }
            }
         }

         try {
            String var31 = var2.substring(0, 0 + var4);
            var31 = this.a(var31);
            boolean var33 = true;
            int[] var11 = zyn.a(this.h, var31);
            int var12 = var11[0];
            int var34 = var11[1];
            int var9 = var11[2];
            int var10 = var11[3];
            if (var12 == -1) {
               var12 = this.h.q().b(var6, -1);
            }

            byte[] var13 = new byte[11];
            System.arraycopy(com.aspose.cells.b.a.zc.a(var12), 0, var13, 1, 2);
            var2 = var2.substring(var4 + 1);
            boolean var14 = false;
            boolean var15 = false;
            boolean var16 = false;
            boolean var17 = false;
            byte var18 = 0;
            byte var19 = 0;

            try {
               int[] var20 = new int[]{var18};
               int[] var21 = new int[]{var19};
               boolean[] var22 = new boolean[]{var14};
               boolean[] var23 = new boolean[]{var15};
               boolean[] var24 = new boolean[]{var16};
               boolean[] var25 = new boolean[]{var17};
               a(var2, var20, var21, true, var22, var23, var24, var25);
               int var36 = var20[0];
               int var37 = var21[0];
               var14 = var22[0];
               var15 = var23[0];
               var16 = var24[0];
               var17 = var25[0];
               if (var16) {
                  if (this.c() && !var14) {
                     if (var36 >= this.e) {
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var36 - this.e), 0, var13, 3, 2);
                     } else {
                        System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var36 + 1), 0, var13, 3, 2);
                     }
                  } else {
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var36), 0, var13, 3, 2);
                  }

                  var13[9] = -1;
                  if (!var14) {
                     var13[8] = (byte)(var13[8] | 128);
                  }
               } else if (var17) {
                  var13[5] = -1;
                  var13[6] = -1;
                  if (this.c() && !var15) {
                     if (var37 >= this.f) {
                        var13[7] = (byte)(var37 - this.f);
                     } else {
                        var13[7] = (byte)(255 - this.f + var37 + 1);
                     }
                  } else {
                     var13[7] = (byte)var37;
                  }

                  if (!var15) {
                     var13[8] = (byte)(var13[8] | 64);
                  }
               } else {
                  if (this.c() && !var14) {
                     if (var36 >= this.e) {
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var36 - this.e), 0, var13, 3, 2);
                     } else {
                        System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var36 + 1), 0, var13, 3, 2);
                     }
                  } else {
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var36), 0, var13, 3, 2);
                  }

                  if (this.c() && !var15) {
                     if (var37 >= this.f) {
                        var13[7] = (byte)(var37 - this.f);
                     } else {
                        var13[7] = (byte)(255 - this.f + var37 + 1);
                     }
                  } else {
                     var13[7] = (byte)var37;
                  }

                  if (!var14) {
                     var13[8] = (byte)(var13[8] | 128);
                  }

                  if (!var15) {
                     var13[8] = (byte)(var13[8] | 64);
                  }
               }

               boolean var26 = var16;
               boolean var27 = var17;
               var14 = false;
               var15 = false;
               var16 = false;
               var17 = false;
               var20[0] = var36;
               var21[0] = var37;
               var22[0] = var14;
               var23[0] = var15;
               var24[0] = var16;
               var25[0] = var17;
               a(var3, var20, var21, true, var22, var23, var24, var25);
               var36 = var20[0];
               var37 = var21[0];
               var14 = var22[0];
               var15 = var23[0];
               var16 = var24[0];
               var17 = var25[0];
               if (var26 != var16 || var27 != var17) {
                  throw new CellsException(5, "Invalid formula.");
               }

               if (var16) {
                  if (this.c() && !var14) {
                     if (var36 >= this.e) {
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var36 - this.e), 0, var13, 5, 2);
                     } else {
                        System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var36 + 1), 0, var13, 5, 2);
                     }
                  } else {
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var36), 0, var13, 5, 2);
                  }

                  if (!var14) {
                     var13[10] = (byte)(var13[10] | 128);
                  }
               } else if (var17) {
                  if (this.c() && !var15) {
                     if (var37 >= this.f) {
                        var13[9] = (byte)(var37 - this.f);
                     } else {
                        var13[9] = (byte)(255 - this.f + var37 + 1);
                     }
                  } else {
                     var13[9] = (byte)var37;
                  }

                  if (!var15) {
                     var13[10] = (byte)(var13[10] | 64);
                  }
               } else {
                  if (this.c() && !var14) {
                     if (var36 >= this.e) {
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var36 - this.e), 0, var13, 5, 2);
                     } else {
                        System.arraycopy(com.aspose.cells.b.a.zc.a('\uffff' - this.e + var36 + 1), 0, var13, 5, 2);
                     }
                  } else {
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var36), 0, var13, 5, 2);
                  }

                  if (this.c() && !var15) {
                     if (var37 >= this.f) {
                        var13[9] = (byte)(var37 - this.f);
                     } else {
                        var13[9] = (byte)(255 - this.f + var37 + 1);
                     }
                  } else {
                     var13[9] = (byte)var37;
                  }

                  if (!var14) {
                     var13[10] = (byte)(var13[10] | 128);
                  }

                  if (!var15) {
                     var13[10] = (byte)(var13[10] | 64);
                  }
               }
            } catch (Exception var28) {
               throw new CellsException(5, b);
            }

            switch(var5) {
            case 32:
               var13[0] = 59;
               break;
            case 64:
               var13[0] = 91;
               break;
            case 96:
               var13[0] = 123;
            }

            return var13;
         } catch (Exception var29) {
            throw new CellsException(5, b);
         }
      }
   }

   private int[] c(zabd var1, int var2) {
      if (var1.d() != null && var1.d().size() != 0) {
         if (var1.d().size() > 255) {
            throw new CellsException(5, b);
         }

         var1.a(new byte[4]);
         switch(var2) {
         case 96:
            var1.f()[0] = 98;
            break;
         default:
            var1.f()[0] = 66;
         }

         var1.f()[1] = (byte)var1.d().size();
         var1.f()[2] = 4;
      } else {
         var1.a(new byte[4]);
         var1.f()[0] = 25;
         var1.f()[1] = 16;
      }

      return zabl.h;
   }

   private int[] a(zabd var1, int var2, int var3, int var4) {
      var1.a(new byte[4]);
      switch(var3) {
      case 32:
         var1.f()[0] = 34;
         break;
      case 64:
         var1.f()[0] = 66;
         break;
      case 96:
         var1.f()[0] = 98;
      }

      if (var1.d() != null && var1.d().size() != 0) {
         var1.f()[1] = (byte)var1.d().size();
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var2), 0, var1.f(), 2, 2);
      return zyn.a(var2 & '\uffff', var4, var1);
   }

   private int[] b(zabd var1, int var2, int var3, int var4) {
      var1.a(new byte[3]);
      if (this.c()) {
         var1.f()[0] = 33;
      } else {
         switch(var3) {
         case 32:
            var1.f()[0] = 33;
            break;
         case 64:
            if (zyn.a(var2 & '\uffff', var4) == 96 && var1.c() != null) {
               var1.f()[0] = 97;
            } else {
               var1.f()[0] = 65;
            }
            break;
         case 96:
            var1.f()[0] = 97;
         }
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var2), 0, var1.f(), 1, 2);
      return zyn.a(var2 & '\uffff', var4, var1);
   }

   private void b(zabd var1, String var2, int var3) {
      int[] var4 = this.h.a(var2, true);
      int var5 = var4[0];
      int var6 = var4[1];
      byte[] var7 = new byte[7];
      System.arraycopy(com.aspose.cells.b.a.zc.a(var5), 0, var7, 1, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var6 + 1), 0, var7, 3, 2);
      switch(var3) {
      case 32:
         var7[0] = 57;
         break;
      case 64:
         var7[0] = 89;
         break;
      case 96:
         var7[0] = 121;
      }

      var1.a(5);
      var1.a(var7);
   }

   private int[] b(zabd var1, int var2, int var3) {
      String var4 = var1.b();
      boolean var5 = false;
      if (var4.startsWith("_XLFN.")) {
         var4 = var4.substring("_XLFN.".length());
         var5 = true;
      }

      zabl var6 = zabl.a(var4, var3);
      if (var6 != null) {
         switch(var6.a) {
         case 480:
            var6 = null;
            if (!var5) {
               var1.a = "_xlfn." + var1.a;
            }
         }
      }

      if (var6 == null) {
         var1.a(5);
         var1.a(this.d(var1, var1.a, var2));
         return zabl.h;
      } else {
         if ((var6.a & '\uffff') == 255) {
            var1.a(5);
            this.b(var1, var1.a, var2);
         } else if (var6.c != var6.d) {
            var1.a(new byte[4]);
            switch(var2) {
            case 32:
               var1.f()[0] = 34;
               break;
            case 64:
               var1.f()[0] = 66;
               break;
            case 96:
               var1.f()[0] = 98;
            }

            if (var1.d() != null && var1.d().size() != 0) {
               var1.f()[1] = (byte)var1.d().size();
            }

            System.arraycopy(com.aspose.cells.b.a.zc.a(var6.a), 0, var1.f(), 2, 2);
         } else {
            var1.a(new byte[3]);
            if (this.c()) {
               var1.f()[0] = 33;
            } else {
               switch(var2) {
               case 32:
                  var1.f()[0] = 33;
                  break;
               case 64:
                  if (var6.f == 96 && var1.c() != null) {
                     var1.f()[0] = 97;
                     break;
                  }

                  var1.f()[0] = 65;
                  break;
               case 96:
                  var1.f()[0] = 97;
               }
            }

            System.arraycopy(com.aspose.cells.b.a.zc.a(var6.a), 0, var1.f(), 1, 2);
         }

         return var6.e;
      }
   }

   private byte[] c(zabd var1, String var2, int var3) {
      int var4 = this.h.u();

      try {
         if (var1.i() == 3) {
            var1.a(5);
         }

         int[] var6 = this.h.getNames().a(this.g, var2, var1.i() == 5, true);
         int var7 = var6[0];
         int var8 = var6[1];
         byte[] var5;
         if (var7 != -1) {
            var5 = new byte[7];
            System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, var5, 1, 2);
            System.arraycopy(com.aspose.cells.b.a.zc.a(var8 + 1), 0, var5, 3, 2);
            switch(var3) {
            case 32:
               var5[0] = 57;
               break;
            case 64:
               var5[0] = 89;
               break;
            case 96:
               var5[0] = 121;
            }
         } else {
            var5 = new byte[5];
            System.arraycopy(com.aspose.cells.b.a.zc.a(var8 + 1), 0, var5, 1, 2);
            switch(var3) {
            case 32:
               var5[0] = 35;
               break;
            case 64:
               var5[0] = 67;
               break;
            case 96:
               var5[0] = 99;
            }
         }

         return var5;
      } catch (Exception var9) {
         throw new CellsException(5, b);
      }
   }

   private byte[] d(zabd var1, String var2, int var3) {
      var1.a(5);
      int var4 = this.h.u();

      try {
         int[] var6 = this.h.a(var2, false);
         if (var6 == null) {
            var6 = this.h.getNames().a(this.g, var2, true, true);
         }

         int var7 = var6[0];
         int var8 = var6[1];
         byte[] var5;
         if (var7 != -1) {
            var5 = new byte[7];
            System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, var5, 1, 2);
            System.arraycopy(com.aspose.cells.b.a.zc.a(var8 + 1), 0, var5, 3, 2);
            switch(var3) {
            case 32:
               var5[0] = 57;
               break;
            case 64:
               var5[0] = 89;
               break;
            case 96:
               var5[0] = 121;
            }
         } else {
            var5 = new byte[5];
            System.arraycopy(com.aspose.cells.b.a.zc.a(var8 + 1), 0, var5, 1, 2);
            switch(var3) {
            case 32:
               var5[0] = 35;
               break;
            case 64:
               if (var1.i() == 5) {
                  var5[0] = 35;
               } else {
                  var5[0] = 67;
               }
               break;
            case 96:
               var5[0] = 99;
            }
         }

         return var5;
      } catch (Exception var9) {
         throw new CellsException(5, b);
      }
   }

   private boolean b(String var1) {
      return var1.length() > 0 && var1.charAt(0) == '[' && var1.charAt(var1.length() - 1) == ']';
   }

   private boolean c(String var1) {
      return var1.length() > 0 && var1.charAt(0) != '\'' && var1.indexOf(124) != -1;
   }

   private boolean d(String var1) {
      int var2 = var1.length() - 1;

      while(var2 >= 0) {
         switch(var1.charAt(var2)) {
         case '!':
            return true;
         case ':':
            return false;
         default:
            --var2;
         }
      }

      return true;
   }

   static byte[] a(WorksheetCollection var0, int var1, int var2, int var3, String var4, int var5, int var6) {
      int var7 = var0.u();
      Object var8 = null;
      int var9 = -1;
      if (var1 == var7) {
         var9 = var0.getNames().b(var3, var4);
      } else {
         if (var4.length() > 2 && var4.charAt(0) == '\'') {
            var4 = var4.substring(1, 1 + (var4.length() - 2));
         }

         var4 = var4.toUpperCase();
         zbqg var10 = var0.v().a(var1);
         if (var10.b().size() > 0) {
            for(int var11 = 0; var11 < var10.b().size(); ++var11) {
               zuk var12 = (zuk)var10.b().get(var11);
               if (com.aspose.cells.b.a.zv.b(var12.e().toUpperCase(), var4)) {
                  var9 = var11;
               }
            }
         }

         if (var9 == -1) {
            zuk var14 = new zuk(var10);
            var14.a(var4);
            var9 = com.aspose.cells.b.a.a.ze.a(var10.b(), (Object)var14);
         }
      }

      byte[] var13 = new byte[7];
      switch(var6) {
      case 32:
         var13[0] = 57;
         break;
      case 64:
         var13[0] = 89;
         break;
      case 96:
         var13[0] = 121;
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var2), 0, var13, 1, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var9 + 1), 0, var13, 3, 2);
      return var13;
   }

   static boolean a(String var0, int[] var1, int[] var2, boolean var3, boolean[] var4, boolean[] var5, boolean[] var6, boolean[] var7) {
      var1[0] = 0;
      var2[0] = 0;
      if ("".equals(var0)) {
         return false;
      } else {
         int var8 = 0;
         String var9;
         int var10;
         if (var0.charAt(0) == '$') {
            if (com.aspose.cells.b.a.zm.b(var0, 1)) {
               var4[0] = true;
               var6[0] = true;
               var1[0] = com.aspose.cells.b.a.zo.a(var0.substring(1)) - 1;
               return var3;
            } else {
               var5[0] = true;

               for(var10 = 2; var10 < var0.length(); ++var10) {
                  if (com.aspose.cells.b.a.zm.b(var0, var10)) {
                     var8 = var10;
                     break;
                  }
               }

               if (var8 == 0) {
                  if (var0.length() <= 4 && var0.length() != 1) {
                     var7[0] = true;
                     var2[0] = CellsHelper.columnNameToIndex(var0.substring(1));
                     return var3;
                  } else {
                     return false;
                  }
               } else {
                  if (var0.charAt(var8 - 1) == '$') {
                     var9 = var0.substring(1, 1 + (var8 - 2));
                     var4[0] = true;
                  } else {
                     var9 = var0.substring(1, 1 + (var8 - 1));
                  }

                  var1[0] = com.aspose.cells.b.a.zo.a(var0.substring(var8)) - 1;
                  var2[0] = CellsHelper.columnNameToIndex(var9);
                  return var2[0] <= 255;
               }
            }
         } else if (com.aspose.cells.b.a.zm.b(var0, 0)) {
            var6[0] = true;
            var1[0] = com.aspose.cells.b.a.zo.a(var0) - 1;
            return var3;
         } else {
            for(var10 = 1; var10 < var0.length(); ++var10) {
               if (com.aspose.cells.b.a.zm.b(var0, var10)) {
                  var8 = var10;
                  break;
               }
            }

            if (var8 == 0) {
               if (var0.length() <= 3 && var0.length() != 0) {
                  var7[0] = true;
                  var2[0] = CellsHelper.columnNameToIndex(var0);
                  return var3;
               } else {
                  return false;
               }
            } else {
               if (var0.charAt(var8 - 1) == '$') {
                  var9 = var0.substring(0, 0 + (var8 - 1));
                  var4[0] = true;
               } else {
                  var9 = var0.substring(0, 0 + var8);
               }

               if (var9.length() > 3) {
                  return false;
               } else {
                  String var12 = var0.substring(var8);

                  for(int var11 = 0; var11 < var12.length(); ++var11) {
                     if (!com.aspose.cells.b.a.zm.b(var12, var11)) {
                        return false;
                     }
                  }

                  var1[0] = com.aspose.cells.b.a.zo.a(var12) - 1;
                  if (var1[0] < 0) {
                     return false;
                  } else {
                     var2[0] = CellsHelper.columnNameToIndex(var9);
                     if (var2[0] > 255) {
                        return false;
                     } else {
                        return true;
                     }
                  }
               }
            }
         }
      }
   }
}
